<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<script type="text/javascript">
$(function(){
	 var exceptionBeginTime='${exceptionBeginTime}';
     var exceptionEndTime='${exceptionEndTime}';
   		$('#exceptionRestForm').click(function(){
	  
		 $("#excepUserId").val("");
		 $("#excepIp").val("");
		 $("#exceStartTime").val(exceptionBeginTime);
		 $("#exceEndTime").val(exceptionEndTime);
	 	});
	  });
</script>
<form id="pagerForm" method="post" action="${ctx}/exception/page">

</form>

<form rel="pagerForm" onsubmit="return navTabSearch(this);">
         <input type="hidden" name="pageNum" value="${page.current}" />
    <input type="hidden" name="pageSize" value="${page.pageSize}" />
    <input type="hidden" name="numPerPage" value="${page.pageSize}" />
    <input type="hidden" name="exceptionTemp" value="true" />
	<input type="hidden" name="exceptionBeginTime" value="${exceptionBeginTime}" />
	<input type="hidden" name="exceptionEndTime" value="${exceptionEndTime}" />
	<div class="pageHeader">

		<div class="searchBar">
			<table class="searchContent">
				<tbody>
					<tr>
						<td align="right">用户：</td>
						<td align="left"><input type="text" name="userId" size="18" id="excepUserId"
							class="textInput" value="${userId}" />
						<td>
						<td align="right">IP：</td>
						<td align="left"><input type="text" name="ip" size="18" id="excepIp"
							class="textInput" value="${ip}" />
						<td>
						<td align="right">时间：</td>
						<td align="left"><input type="text"
							class="date textInput readonly" readonly="true"
							dateFmt="yyyy-MM-dd HH:mm" value="${startTime}" name="startTime" id="exceStartTime">
							至 <input type="text" class="date textInput readonly"
							readonly="true" dateFmt="yyyy-MM-dd HH:mm" value="${endTime}" id="exceEndTime"
							name="endTime">
						<td>
					</tr>


				</tbody>

			</table>
			<div class="subBar">
				<ul>
					<li><div class="buttonActive">
							<div class="buttonContent">
								<button id="but_submit"class="sous">查询</button>
							</div>
						</div></li>
						<li><div class="buttonActive">
							<div class="buttonContent">
								
								<button type="button" id="exceptionRestForm">重置</button>
							</div>
						</div></li>
				</ul>
			</div>
		</div>
	</div>
</form>

<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="icon" href="${ctx}/exception/export"
				target="dwzExport"  targetType="navTab" title="确实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="143">
		<thead>
			<tr>
				<th align="center">时间</th>
				<th align="center">用户</th>
				<th align="center">IP</th>
				<th align="center">访问页面数</th>

			</tr>
		</thead>
		<tbody>
			<c:forEach items="${page.data}" var="item">
				<tr target="sid" rel="${item.id}">
					<td>${item.formatDataTime}</td>
					<td>${item.userId}</td>
					<td>${item.ip}</td>
					<td><c:if test="${item.urlCount>0}">

							<a title="详细列表"
								href="${ctx}/exception/detail?time=${item.formatDataTime}&flag=1"
								target="dialog" width="1200" height="600" mask="true"maxable="false"minable="false"
								style="color: #0082E4;">${item.urlCount}</a></td>
					</c:if>
					<c:if test="${item.urlCount==0}">
				
				${item.urlCount}
				</c:if>

				</tr>
			</c:forEach>
		</tbody>
	</table>
    <%@include file="/WEB-INF/view/commons/paging.jsp"%>
</div>
